--[[=========================================================
	DATABASE TESTING LIBRARY
=========================================================]]--
if SERVER then

--[[-----------------------------------------------------]]--
--	General DB test
--[[-----------------------------------------------------]]--
sql.PerformGeneralTest				= function()

	--	Start of test
	DEBUG:Msg( "START OF TEST", "sql.PerformGeneralTest" )

	--	1. Drop current database
	sql.DropDataBase()
	DEBUG:Msg( "DATABASE DROPPED", "sql.PerformGeneralTest" )
	
	--	2. Create empty database
	sql.CreateDataBase()
	DEBUG:Msg( "DATABASE CREATED", "sql.PerformGeneralTest" )
	
	--	3. Create an object of each type
	local soundInfo					= ObjSoundInfo()
	local activityInfo				= ObjActivityInfo()
	local damageInfo				= ObjDamageInfo()
	local viewTransformInfo			= ObjViewTransformInfo()
	local objectType				= ObjObjectType()
	local weapon					= ObjWeapon()
	local firemode					= ObjFiremode()
	local weaponFiremode			= ObjWeaponFiremode()
	DEBUG:Msg( "OBJECTS CREATED", "sql.PerformGeneralTest" )
	
	--	4. Create object links
	firemode.DamageInfo				= damageInfo
	firemode.MeleeInfo				= damageInfo
	firemode.IdleSound				= soundInfo
	firemode.DeploySound			= soundInfo
	firemode.ShootSound				= soundInfo
	firemode.EmptySound				= soundInfo
	firemode.ReloadSound			= soundInfo
	firemode.StopReloadSound		= soundInfo
	firemode.SwitchModeSound		= soundInfo
	firemode.SightsInSound			= soundInfo
	firemode.SightsOutSound			= soundInfo
	firemode.ScopeInSound			= soundInfo
	firemode.ScopeOutSound			= soundInfo
	firemode.HolsterInSound			= soundInfo
	firemode.HolsterOutSound		= soundInfo
	firemode.RunInSound				= soundInfo
	firemode.RunOutSound			= soundInfo
	firemode.WallInSound			= soundInfo
	firemode.WallOutSound			= soundInfo
	firemode.MeleeSound				= soundInfo
	firemode.IdleActivity			= activityInfo
	firemode.DeployActivity			= activityInfo
	firemode.ShootActivity			= activityInfo
	firemode.ReloadActivity			= activityInfo
	firemode.StopReloadActivity		= activityInfo
	firemode.SwitchModeActivity		= activityInfo
	firemode.SightsInActivity		= activityInfo
	firemode.SightsOutActivity		= activityInfo
	firemode.ScopeInActivity		= activityInfo
	firemode.ScopeOutActivity		= activityInfo
	firemode.HolsterInActivity		= activityInfo
	firemode.HolsterOutActivity		= activityInfo
	firemode.RunActivity			= activityInfo
	firemode.WallActivity			= activityInfo
	firemode.MeleeActivity			= activityInfo
	firemode.SightsTransform		= viewTransformInfo
	firemode.HolsterTransform		= viewTransformInfo
	firemode.RunTransform			= viewTransformInfo
	firemode.RunHolsteredTransform	= viewTransformInfo
	firemode.WallTransform			= viewTransformInfo
	firemode.WallHolsteredTransform	= viewTransformInfo
	firemode.MeleeTransform			= viewTransformInfo
	firemode.ScopeTransform			= viewTransformInfo
	weaponFiremode.Weapon			= weapon
	weaponFiremode.Firemode			= firemode
	DEBUG:Msg( "LINKS CREATED", "sql.PerformGeneralTest" )
	
	--	5. Insert data
	objectType:Insert()
	weaponFiremode:Insert()
	DEBUG:Msg( "OBJECTS INSERTED", "sql.PerformGeneralTest" )
	
	--	6. Reload data
	objectType:Reload()
	weaponFiremode:Reload()
	DEBUG:Msg( "OBJECTS RELOADED", "sql.PerformGeneralTest" )
	
	--	7. Drop database
	sql.DropDataBase()
	DEBUG:Msg( "DATABASE DROPPED", "sql.PerformGeneralTest" )
	
	--	End of test
	DEBUG:Msg( "END OF TEST", "sql.PerformGeneralTest" )
end

end